## Functions
RegFor <- function(y,x, FE, IV = "0" , clust = "0"){
  ## The default is no IV and no cluster
  print(x)
  print(length(x))
  controls <- ifelse(length(x) == 1, x , paste(x, collapse = " + "))
  print(controls)
  part1 <- paste(y, " ~ ", controls)
  part2 <- ifelse(length(FE) == 1 , FE, paste(FE, collapse = " + "))
  part3 <- IV
  part4 <- ifelse(length(clust) == 1 , clust, parte(clust, sep = "+"))
  Formula <- paste(part1 , part2, part3, part4 ,  sep = " | ")
  return(Formula)
}

AddLines <- function(regN , title, content ) {
  ltoadd <- c(title, content)
  #if (regN +1 != length(ltoadd)) stop("Incorrect length for line given # of regs")
  return(ltoadd)
}

LMc <- function(entry,n = 1) {
  return(paste0("\\multicolumn{" , n, "}{c}{", entry, "}" ))
}
